import java.util.ArrayList;
import java.util.List;
import smfl.advertisement;

/**
 * 
 */

/**
 * @author keithcasamento
 *
 */
public class AdCompany {
    private String name;
    private int advertiserID;
	
    @Override
    public int hashCode() 
    {
        return advertiserID;
    }
    
    @Override
    public boolean equals(Object o)
    {
            return (o instanceof AdCompany)
            && (advertiserID == ( (AdCompany)o ).advertiserID);
    }
	
    /**
     * Links to uploaded ads
     */
    private List<advertisement> currentAds = new ArrayList<advertisement>();

    /**
     * Amount owed by the Company
     */
    private double balance;


    public void delete(advertisement adURL)
    {
        currentAds.remove(adURL);
    }

    /**
     *
     * @return String
     */
    public String getName()
    {
        return name;
    }

    /**
     *
     * @return int
     */
    public int getadvID()
    {
        return advertiserID;
    }

    /**
     *
     * @return List
     */
    public List<advertisement> getCurrAds()
    {
        return currentAds;
    }

    /**
     *
     * @return double
     */
    public double getBalance()
    {
        return balance;
    }

    /**
     *
     * @param String Name of Advertising Company
     */
    public void setName(String n)
    {
        name = n;
    }

    /**
     *
     * @param int ID of Advertising Company
     */
    public void setAdvID(int id)
    {
        advertiserID = id;
    }

    /**
     *
     * @param String new current ad
     */
    public void setCurrAds(advertisement ad)
    {
        currentAds.add(ad);
    }

    /**
     *
     * @param double amount of money owed by company
     */
    public void setBalance(double owed)
    {
        balance = owed;
    }
}
